---
title: "Install Continue CLI"
description: "Get Continue CLI installed and configured for command-line AI coding assistance and automation"
sidebarTitle: "Install"
---

<iframe
  width="100%"
  height="400"
  src="https://www.youtube.com/embed/vm9RcP9xM4o"
  title="Install Continue CLI"
  frameborder="0"
  allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
  allowfullscreen
></iframe>

<Info>
  Make sure you have [Node.js 18 or higher
  installed](https://nodejs.org/en/download/).
</Info>

## Installation

Install Continue CLI globally using npm:

```bash
npm i -g @continuedev/cli
```

## Two Ways to Use Continue CLI

<Info>
  **Quick Overview**: Continue CLI works in two modes - TUI for interactive
  conversations or headless for automated commands.
</Info>

<Tabs>
<Tab title="TUI Mode">
**Interactive development sessions**

Start a conversation with AI in your terminal:

```bash
cn
> @src/app.js Generate unit tests for this component
```

Perfect for exploration, debugging, and iterative development.

</Tab>

<Tab title="Headless Mode">
**Automation and scripting**

Single commands that return results:

```bash
cn -p "Generate a commit message for current changes"
cn -p "Review the last 5 commits for issues"
```

Perfect for CI/CD, git hooks, and automated workflows.

</Tab>
</Tabs>

## Setup

<Tabs>
<Tab title="cn TUI Mode">

For interactive development and exploration:

<Steps>
<Step title="Login to Continue CLI">
```bash
cn login
```
This will open your browser to authenticate with Continue Mission Control.
</Step>

<Step title="Test TUI Mode">
Start an interactive session:
```bash
cn
```

Try asking a question:

```
> Tell me about the CLI
```

</Step>
</Steps>
</Tab>
<Tab title="cn Headless Mode">

For automation workflows and scripting:

<Steps>
<Step title="Get API Key for Automation">
For automation workflows, get an API key:
1. Visit [Continue Mission Control API Keys](https://hub.continue.dev/settings/api-keys)
2. Click **"+ New API Key"**
3. Copy the API key immediately (you won't see it again!)
4. Login using your Continue account
</Step>

<Step title="Add Secrets for Workflows">
Store secure credentials for CLI workflows:
1. Visit [Continue Mission Control Secrets](https://hub.continue.dev/settings/secrets)
2. Add your API keys and sensitive data
3. Reference in configurations with `${{ secrets.SECRET_NAME }}`
</Step>

<Step title="Test Headless Mode">
Try headless mode for automation:
```bash
cn -p "Generate a conventional commit message for the current git changes"
```
</Step>
</Steps>
</Tab>
</Tabs>

## What's Next?

<CardGroup cols={2}>
<Card title="Quick Start Guide" icon="rocket" href="/cli/quick-start">
  Learn basic usage with practical examples
</Card>

<Card title="Create your first workflow" icon="gear" href="/guides/posthog-github-continuous-ai">
  Build automated workflows with Continue CLI
</Card>
</CardGroup>

## Getting Help

If you encounter issues:

- Ask for help in [our discussions](https://github.com/continuedev/continue/discussions)
- Report bugs on [GitHub](https://github.com/continuedev/continue)
